import request from '@/utils/request.js'

// 查询供应商列表
export function getSupplier(current, num) {
    return request.post(`/getSupplier/${current}/${num}`);
}

export function register(supplierDTO) {
    return request.post('/supplier/register', supplierDTO);
}

export function getSupplierProduct(current, num) {
    return request.get(`/supplier/getProductsSupplier/${current}/${num}`);
}
export function getSupplierProductLikeName(current, num, productName) {
    return request.get(`/supplier/getProductByNameLike/${current}/${num}`,{params: {productName: productName}});
}
export function getSupplierInfo() {
    return request.get('/supplier/getSupplierById');
}
export function getProductByMarkerPriceScope_supplier(current, num, little, big){
    return request.get(`/supplier/getProductByMarkerPriceScope/${current}/${num}`,
        {params: {little, big}})
}

// 根据商品分组统计商品价格信息
export function getProductGroup(group) {
    return request.post('/supplier/getProductGroup', group);
}